package com.fintech.datagroud.service.impl;

import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fintech.datagroud.dao.shzx.EdcZxPersonalBaoGaoInfoMapper;
import com.fintech.datagroud.entity.wechat.EdcWxZxQueryMessageRecordsInfo;
import com.fintech.datagroud.service.EdcZxPersonalService;
import com.fintech.third.model.shzx.EdcZxPersonalAddrInfo;
import com.fintech.third.model.shzx.EdcZxPersonalBasicInfo;
import com.fintech.third.model.shzx.EdcZxPersonalFirstOneRelationInfo;
import com.fintech.third.model.shzx.EdcZxPersonalFirstTwoRelationInfo;
import com.fintech.third.model.shzx.EdcZxPersonalGuaranteeInfo;
import com.fintech.third.model.shzx.EdcZxPersonalGuaranteeObjInfo;
import com.fintech.third.model.shzx.EdcZxPersonalInfo;
import com.fintech.third.model.shzx.EdcZxPersonalLoanApplyInfo;
import com.fintech.third.model.shzx.EdcZxPersonalLoanApplyObjInfo;
import com.fintech.third.model.shzx.EdcZxPersonalLoanOrderDetailsInfo;
import com.fintech.third.model.shzx.EdcZxPersonalLoanOrderInfo;
import com.fintech.third.model.shzx.EdcZxPersonalLoanOrderObjInfo;
import com.fintech.third.model.shzx.EdcZxPersonalPromptInfo;
import com.fintech.third.model.shzx.EdcZxPersonalPromptObjInfo;
import com.fintech.third.model.shzx.EdcZxPersonalQueryInfo;
import com.fintech.third.model.shzx.EdcZxPersonalRecordsInfo;
import com.fintech.third.model.shzx.EdcZxPersonalRecordsObjInfo;
import com.fintech.third.model.shzx.EdcZxPersonalSpecialOrderInfo;
import com.fintech.third.model.shzx.EdcZxPersonalSpecialOrderObjInfo;
import com.fintech.third.model.shzx.EdcZxPersonalSpouseInfo;
import com.fintech.third.model.shzx.EdcZxPersonalUnitInfo;
import com.fintech.third.model.shzx.EdcZxQueryMessageRecordsInfo;
import com.marvels.common.utils.MarvelsLogUtil;


/**
 * 类说明：上海资信个人报告服务实现类
 * @author xiongxianghua
 *
 * 2017年11月27日
 */
@Service("edcZxPersonalService")
public class EdcZxPersonalServiceImpl implements EdcZxPersonalService{
	@Autowired
	private EdcZxPersonalBaoGaoInfoMapper baoGaoInfoMapper;
	
	@Override
	public boolean creditPersonalReport(EdcZxPersonalInfo info,Map<String, String> map,String generateOrderNos) {
		String reportNo="";
		String generateOrderNo = generateOrderNos;
		//个人查询信息
		EdcZxPersonalQueryInfo personlQueryInfo=info.getPersonalQuery();
		if(null!=personlQueryInfo){
			reportNo=personlQueryInfo.getReportNo();
			insertEdcZxPersonalQueryInfo(personlQueryInfo,map,generateOrderNo);
		}
		//个人基本信息
		EdcZxPersonalBasicInfo basicInfo=info.getPersonalBasic();
		if(null!=basicInfo){
			basicInfo.setReportNo(reportNo);
			insertEdcZxPersonalBasicInfo(basicInfo,map,generateOrderNo);
		}
		//个人贷款申请信息
		EdcZxPersonalLoanApplyObjInfo loanApplyObjInfo=info.getPersonalLoanApplyObj();
		if(null!=loanApplyObjInfo){
			insertEdcZxPersonalLoanApplyObjInfo(loanApplyObjInfo,reportNo,map,generateOrderNo);
		}
		//贷款交易信息
		EdcZxPersonalLoanOrderObjInfo loanOrderObjInfo=info.getPersonalLoanOrderObjInfo();
		if(null!=loanOrderObjInfo){
			insertEdcZxPersonalLoanOrderObjInfo(loanOrderObjInfo, reportNo,map,generateOrderNo);
		}
		//为他人担保信息
		EdcZxPersonalGuaranteeObjInfo guaranteeObjInfo=info.getPersonalGuaranteeOjbInfo();
		if(null!=guaranteeObjInfo){
			insertEdcZxPersonalGuaranteeObjInfo(guaranteeObjInfo, reportNo,map,generateOrderNo);
		}
		//特殊交易信息
		EdcZxPersonalSpecialOrderObjInfo specialOrderObjInfo=info.getPersonalSpecialOrderObjInfo();
		if(null!=specialOrderObjInfo){
			insertEdcZxPersonalSpecialOrderObjInfo(specialOrderObjInfo, reportNo,map,generateOrderNo);
		}
		//个人声明信息   目前报文中没有返回
		/*EdcZxPersonalStatementObjInfo statementObjInfo=info.getPersonalStatementObjInfo();
		if(null!=statementObjInfo){
			insertEdcZxPersonalStatementObjInfo(statementObjInfo, reportNo);
		}*/
		//查询记录信息
		EdcZxPersonalRecordsObjInfo recordsObjInfo=info.getPersonalRecordsObjInfo();
		if(null!=recordsObjInfo){
			insertEdcZxPersonalRecordsObjInfo(recordsObjInfo, reportNo,map,generateOrderNo);
		}
		EdcZxPersonalPromptObjInfo promptObjInfo=info.getPersonalPromptObjInfo();
		//资信提示信息
		if(null!=promptObjInfo){
			insertEdcZxPersonalPromptObjInfo(promptObjInfo, reportNo,map,generateOrderNo);
		}
		//
		/*EdcZxQueryMessageRecordsInfo reInfo=new EdcZxQueryMessageRecordsInfo();
		reInfo.setLoanId("11");
		reInfo.setCreatedDate(Calendar.getInstance().getTime());
		reInfo.setCreatedBy("xxh");
		reInfo.setUpdatedBy("xxh");
		reInfo.setUpdatedDate(Calendar.getInstance().getTime());
		reInfo.setReportNo(reportNo);
		baoGaoInfoMapper.insertMessageRecords(reInfo);*/
		return true;
	}
	
	/**
	 * //个人查询信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalQueryInfo(EdcZxPersonalQueryInfo info,Map<String, String> map,String generateOrderNo){
		info.setReqNo(generateOrderNo);
		info.setCreatedDate(Calendar.getInstance().getTime());
		info.setCreatedBy(map.get("createdB"));
		info.setUpdatedBy(map.get("updatedBy"));
		info.setUpdatedDate(Calendar.getInstance().getTime());
		baoGaoInfoMapper.insertPersonalInfo(info);
		return true;
	}
	
	/**
	 * 个人基本信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalBasicInfo(EdcZxPersonalBasicInfo info,Map<String, String> map,String generateOrderNo){
		Date date=Calendar.getInstance().getTime();
		String reportNo=info.getReportNo();
		info.setReqNo(generateOrderNo);
		info.setCreatedDate(date);
		info.setCreatedBy(map.get("createdB"));
		info.setUpdatedBy(map.get("updatedBy"));
		info.setUpdatedDate(date);
		
		
		baoGaoInfoMapper.insertBasic(info);
		
		//个人地址信息
		List<EdcZxPersonalAddrInfo> addrInfo=info.getPersonalAddr();
		if(null!=addrInfo&&addrInfo.size()>0){
			for (EdcZxPersonalAddrInfo edcZxPersonalAddrInfo : addrInfo) {
				edcZxPersonalAddrInfo.setCreatedDate(date);
				edcZxPersonalAddrInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalAddrInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalAddrInfo.setUpdatedDate(date);
				edcZxPersonalAddrInfo.setReportNo(reportNo);
				edcZxPersonalAddrInfo.setReqNo(generateOrderNo);
			}
			baoGaoInfoMapper.insertAddr(addrInfo);
		}
		
		//个人单位信息
		List<EdcZxPersonalUnitInfo> personalUnit=info.getPersonalUnit();
		if(null!=personalUnit&&personalUnit.size()>0){
			for (EdcZxPersonalUnitInfo edcZxPersonalUnitInfo : personalUnit) {
				edcZxPersonalUnitInfo.setReportNo(reportNo);
				edcZxPersonalUnitInfo.setCreatedDate(date);
				edcZxPersonalUnitInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalUnitInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalUnitInfo.setUpdatedDate(date);
				edcZxPersonalUnitInfo.setReqNo(generateOrderNo);
			}

			baoGaoInfoMapper.insertPersonalUnit(personalUnit);
		}
		
		//个人配偶信息
		EdcZxPersonalSpouseInfo periouInf=info.getPeriouInfo();
		if(null!=periouInf){
			periouInf.setCreatedDate(date);
			periouInf.setCreatedBy(map.get("createdB"));
			periouInf.setUpdatedBy(map.get("updatedBy"));
			periouInf.setUpdatedDate(date);
			periouInf.setReportNo(reportNo);
			periouInf.setReqNo(generateOrderNo);
			baoGaoInfoMapper.insertPersonalSpouse(periouInf);
		}
		
		//第一联系人信息
		List<EdcZxPersonalFirstOneRelationInfo> personalFirstOneRelatio=info.getPersonalFirstOneRelatio();
		if(null!=personalFirstOneRelatio&&personalFirstOneRelatio.size()>0){
			for (EdcZxPersonalFirstOneRelationInfo edcZxPersonalFirstOneRelationInfo : personalFirstOneRelatio) {
				edcZxPersonalFirstOneRelationInfo.setCreatedDate(date);
				edcZxPersonalFirstOneRelationInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalFirstOneRelationInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalFirstOneRelationInfo.setUpdatedDate(date);
				edcZxPersonalFirstOneRelationInfo.setReportNo(reportNo);
				edcZxPersonalFirstOneRelationInfo.setReqNo(generateOrderNo);
			}
			baoGaoInfoMapper.insertOneRelation(personalFirstOneRelatio);
		}
		//第二联系人
		List<EdcZxPersonalFirstTwoRelationInfo> personalFirstTwoRelatio=info.getPersonalFirstTwoRelatio();
		if(null!=personalFirstTwoRelatio&&personalFirstTwoRelatio.size()>0){
			for (EdcZxPersonalFirstTwoRelationInfo edcZxPersonalFirstTwoRelationInfo : personalFirstTwoRelatio) {
				edcZxPersonalFirstTwoRelationInfo.setCreatedDate(date);
				edcZxPersonalFirstTwoRelationInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalFirstTwoRelationInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalFirstTwoRelationInfo.setUpdatedDate(date);
				edcZxPersonalFirstTwoRelationInfo.setReportNo(reportNo);
				edcZxPersonalFirstTwoRelationInfo.setReqNo(generateOrderNo);
			}
			baoGaoInfoMapper.insertTwoRelation(personalFirstTwoRelatio);
		}
		
		
		return true;
	}
	/**
	 * 个人贷款申请信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalLoanApplyObjInfo(EdcZxPersonalLoanApplyObjInfo info,String reportNo,Map<String, String> map,String generateOrderNo){
		Date date=Calendar.getInstance().getTime();
		List<EdcZxPersonalLoanApplyInfo> loanApplyList=info.getLoanApplyList();
		if(null!=loanApplyList&&loanApplyList.size()>0){
			for (EdcZxPersonalLoanApplyInfo edcZxPersonalLoanApplyInfo : loanApplyList) {
				edcZxPersonalLoanApplyInfo.setCreatedDate(date);
				edcZxPersonalLoanApplyInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalLoanApplyInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalLoanApplyInfo.setUpdatedDate(date);
				edcZxPersonalLoanApplyInfo.setReportNo(reportNo);
				edcZxPersonalLoanApplyInfo.setReqNo(generateOrderNo);
			}

			baoGaoInfoMapper.insertLoanApply(loanApplyList);
		}
		return true;
	}
	
	/**
	 * 贷款交易信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalLoanOrderObjInfo(EdcZxPersonalLoanOrderObjInfo info,String reportNo,Map<String, String> map,String generateOrderNo){
		Date date=Calendar.getInstance().getTime();
		//详情
		List<EdcZxPersonalLoanOrderDetailsInfo> loanOrderDetailsList=info.getLoanOrderDetailsList();
		if(null!=loanOrderDetailsList&&loanOrderDetailsList.size()>0){
			for (EdcZxPersonalLoanOrderDetailsInfo edcZxPersonalLoanOrderDetailsInfo : loanOrderDetailsList) {
				edcZxPersonalLoanOrderDetailsInfo.setCreatedDate(date);
				edcZxPersonalLoanOrderDetailsInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalLoanOrderDetailsInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalLoanOrderDetailsInfo.setUpdatedDate(date);
				edcZxPersonalLoanOrderDetailsInfo.setReportNo(reportNo);
				edcZxPersonalLoanOrderDetailsInfo.setReqNo(generateOrderNo);
			}

			baoGaoInfoMapper.insertOrderDetails(loanOrderDetailsList);
		}
		
		//概要
		EdcZxPersonalLoanOrderInfo loanOrderInfo=info.getLoanOrderInfo();
		if(null!=loanOrderInfo){
			loanOrderInfo.setCreatedDate(date);
			loanOrderInfo.setCreatedBy(map.get("createdB"));
			loanOrderInfo.setUpdatedBy(map.get("updatedBy"));
			loanOrderInfo.setUpdatedDate(date);
			loanOrderInfo.setReportNo(reportNo);
			loanOrderInfo.setReqNo(generateOrderNo);
			baoGaoInfoMapper.insertLoanOrder(loanOrderInfo);
		}
		
		return true;
	}
	
	/**
	 * 为他人担保信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalGuaranteeObjInfo(EdcZxPersonalGuaranteeObjInfo info,String reportNo,Map<String, String> map,String generateOrderNo){
		Date date=Calendar.getInstance().getTime();
		List<EdcZxPersonalGuaranteeInfo> listInfo=info.getPersonalGuaranteeInfo();
		
		if(null!=listInfo){
			for (EdcZxPersonalGuaranteeInfo edcZxPersonalGuaranteeInfo : listInfo) {
				edcZxPersonalGuaranteeInfo.setCreatedDate(date);
				edcZxPersonalGuaranteeInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalGuaranteeInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalGuaranteeInfo.setUpdatedDate(date);
				edcZxPersonalGuaranteeInfo.setReportNo(reportNo);
				edcZxPersonalGuaranteeInfo.setReqNo(generateOrderNo);
			}

			baoGaoInfoMapper.insertGuarantee(listInfo);
		}
		return true;
	}
	/**
	 * 特殊交易信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalSpecialOrderObjInfo(EdcZxPersonalSpecialOrderObjInfo info,String reportNo,Map<String, String> map,String generateOrderNo){
		
		Date date=Calendar.getInstance().getTime();
		List<EdcZxPersonalSpecialOrderInfo> personalSpecialOrderInfo =info.getPersonalSpecialOrderInfo();
		if(null!=personalSpecialOrderInfo){
			for (EdcZxPersonalSpecialOrderInfo edcZxPersonalSpecialOrderInfo : personalSpecialOrderInfo) {
				edcZxPersonalSpecialOrderInfo.setCreatedDate(date);
				edcZxPersonalSpecialOrderInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalSpecialOrderInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalSpecialOrderInfo.setUpdatedDate(date);
				edcZxPersonalSpecialOrderInfo.setReportNo(reportNo);
				edcZxPersonalSpecialOrderInfo.setReqNo(generateOrderNo);
			}

			baoGaoInfoMapper.insertSpecialOrderInfo(personalSpecialOrderInfo);
		}
		return true;
	}
	
	/**
	 * 个人声明信息
	 * @param info
	 * @return
	 */
	/*public boolean insertEdcZxPersonalStatementObjInfo(EdcZxPersonalStatementObjInfo info,String reportNo){
		Date date=Calendar.getInstance().getTime();
		
		return true;
	}*/
	/**
	 * 查询记录信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalRecordsObjInfo(EdcZxPersonalRecordsObjInfo info,String reportNo,Map<String, String> map,String generateOrderNo){
		Date date=Calendar.getInstance().getTime();
		
		List<EdcZxPersonalRecordsInfo> personalRecordsInfo=info.getPersonalRecordsInfo();
		if(null!=personalRecordsInfo&&personalRecordsInfo.size()>0){
			for (EdcZxPersonalRecordsInfo edcZxPersonalRecordsInfo : personalRecordsInfo) {
				edcZxPersonalRecordsInfo.setCreatedDate(date);
				edcZxPersonalRecordsInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalRecordsInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalRecordsInfo.setUpdatedDate(date);
				edcZxPersonalRecordsInfo.setReportNo(reportNo);
				edcZxPersonalRecordsInfo.setReqNo(generateOrderNo);
			}

			baoGaoInfoMapper.insertRecordsInfo(personalRecordsInfo);
		}
		return true;
	}
	
	/**
	 * 资信提示信息
	 * @param info
	 * @return
	 */
	private boolean insertEdcZxPersonalPromptObjInfo(EdcZxPersonalPromptObjInfo info,String reportNo,Map<String, String> map,String generateOrderNo){
		Date date=Calendar.getInstance().getTime();
		
		List<EdcZxPersonalPromptInfo> personalRecordsInfo=info.getPersonalPromptInfo();
		if(null!=personalRecordsInfo){
			for (EdcZxPersonalPromptInfo edcZxPersonalPromptInfo : personalRecordsInfo) {
				edcZxPersonalPromptInfo.setCreatedDate(date);
				edcZxPersonalPromptInfo.setCreatedBy(map.get("createdB"));
				edcZxPersonalPromptInfo.setUpdatedBy(map.get("updatedBy"));
				edcZxPersonalPromptInfo.setUpdatedDate(date);
				edcZxPersonalPromptInfo.setReportNo(reportNo);
				edcZxPersonalPromptInfo.setReqNo(generateOrderNo);
			}

			baoGaoInfoMapper.insertPrompt(personalRecordsInfo);
		}
		return true;
	}

	@Override
	public EdcZxPersonalInfo queryEdcZxPersonalInfo(Map<String, String> map) {
		EdcZxPersonalInfo personalInfo=new EdcZxPersonalInfo();
		
		String reqNo=map.get("reqNo");
		
	
		//个人基本信息
		EdcZxPersonalBasicInfo basicInfo=baoGaoInfoMapper.queryEdcZxPersonalBasicInfo(reqNo);
		if(null==basicInfo){
			basicInfo=new EdcZxPersonalBasicInfo();
		}
		List<EdcZxPersonalAddrInfo> addList=baoGaoInfoMapper.queryPersonalAddr(reqNo);
		basicInfo.setPersonalAddr(addList);
		List<EdcZxPersonalUnitInfo> unitList=baoGaoInfoMapper.queryPersonalUnitInfo(reqNo);
		basicInfo.setPersonalUnit(unitList);
		List<EdcZxPersonalFirstOneRelationInfo> relaList=baoGaoInfoMapper.queryPersonalFirstOneRelationInfo(reqNo);
		basicInfo.setPersonalFirstOneRelatio(relaList);
		//个人信息原因查询
		EdcZxPersonalQueryInfo personalQueryInfo=baoGaoInfoMapper.queryPersonalQueryInfo(reqNo);
		personalInfo.setPersonalQuery(personalQueryInfo);
		//配偶信息
		EdcZxPersonalSpouseInfo spouseInfo=baoGaoInfoMapper.queryPersonalSpouseInfo(reqNo);
		if(null!=spouseInfo){
			basicInfo.setPeriouInfo(spouseInfo);
		}
		
		personalInfo.setPersonalBasic(basicInfo);
		//贷款申请信息
		List<EdcZxPersonalLoanApplyInfo> loanApplyList=baoGaoInfoMapper.queryPersonalLoanApplyInfo(reqNo);
		if(null!=loanApplyList){
			personalInfo.setPersonalLoanApplyObj(new EdcZxPersonalLoanApplyObjInfo());
			personalInfo.getPersonalLoanApplyObj().setLoanApplyList(loanApplyList);
		}
		//个人交易概要信息
		EdcZxPersonalLoanOrderInfo loanOrder=baoGaoInfoMapper.queryPersonalLoanOrderInfo(reqNo);
		personalInfo.setPersonalLoanOrderObjInfo(new EdcZxPersonalLoanOrderObjInfo());
		if(null!=loanOrder){
			personalInfo.getPersonalLoanOrderObjInfo().setLoanOrderInfo(loanOrder);
		}
		//个人交易详情信息
		List<EdcZxPersonalLoanOrderDetailsInfo> orderDetailList=baoGaoInfoMapper.queryPersonalLoanOrderDetailsInfo(reqNo);
		if(null!=orderDetailList){
			personalInfo.getPersonalLoanOrderObjInfo().setLoanOrderDetailsList(orderDetailList);
		}
		//个人担保信息
		List<EdcZxPersonalGuaranteeInfo> guaramList=baoGaoInfoMapper.queryPersonalGuaranteeInfo(reqNo);
		if(null!=guaramList){
			personalInfo.setPersonalGuaranteeOjbInfo(new EdcZxPersonalGuaranteeObjInfo());
			personalInfo.getPersonalGuaranteeOjbInfo().setPersonalGuaranteeInfo(guaramList);
		}
		//特殊交易信息
		List<EdcZxPersonalSpecialOrderInfo> orderList=baoGaoInfoMapper.queryPersonalSpecialOrderInfo(reqNo);
		if(null!=orderList){
			personalInfo.setPersonalSpecialOrderObjInfo(new EdcZxPersonalSpecialOrderObjInfo());
			personalInfo.getPersonalSpecialOrderObjInfo().setPersonalSpecialOrderInfo(orderList);
		}
		//查询记录信息
		List<EdcZxPersonalRecordsInfo> recoredsList=baoGaoInfoMapper.queryPersonalRecordsInfo(reqNo);
		if(null!=recoredsList){
			personalInfo.setPersonalRecordsObjInfo(new EdcZxPersonalRecordsObjInfo());
			personalInfo.getPersonalRecordsObjInfo().setPersonalRecordsInfo(recoredsList);
		}
		//资信提示信息
		List<EdcZxPersonalPromptInfo> promptList=baoGaoInfoMapper.queryPersonalPromptInfo(reqNo);
		if(null!=promptList){
			personalInfo.setPersonalPromptObjInfo(new EdcZxPersonalPromptObjInfo());
			personalInfo.getPersonalPromptObjInfo().setPersonalPromptInfo(promptList);
		}
		MarvelsLogUtil.getInstance().info("查询个人征信信息personalInfo：  "+personalInfo.toString());
		return personalInfo;
	}

	
	@Override
	public List<EdcZxQueryMessageRecordsInfo> queryMessageRecordsInfo(String loanId) {
		List<EdcZxQueryMessageRecordsInfo> listRecords= baoGaoInfoMapper.queryMessageRecordsInfo(loanId);
		return listRecords;
	}

	@Override
	public void insertMessageRecords(EdcZxQueryMessageRecordsInfo record) {
		baoGaoInfoMapper.insertMessageRecords(record);
	}

	@Override
	public Map<String, String> queryZxDataInfo(String loanId) {
		return baoGaoInfoMapper.queryZxDataInfo(loanId);
	}

	@Override
	public List<Map<String, Object>> queryShZxSituaInfo(String loanId) {
		return baoGaoInfoMapper.queryShZxSituaInfo(loanId);
	}

	/**
	 * 插入错误数据
	 * 微信小程序调用
	 */
	@Override
	public void insertWxMessageRecords(EdcWxZxQueryMessageRecordsInfo recordsInfo) {
		baoGaoInfoMapper.insertWxMessageRecords(recordsInfo);
		
	}


	/**
	 * 根据手机号查询上海咨讯个人征信报告记录信息
	 * @param string
	 * @return
	 */
	@Override
	public List<EdcWxZxQueryMessageRecordsInfo> queryWxMessageRecordsInfo(String mobileNo) {
		
		return baoGaoInfoMapper.queryWxMessageRecordsInfo(mobileNo);
	}

	
	
}
